# Maintainer: Jelle van der Waa <jelle@archlinux.org>
# Maintainer: Santiago Torres-Arias <santiago@archlinux.org>
# Contributor: Mike Swanson <mikeonthecomputer@gmail.com>

pkgname=disorderfs
pkgver=0.5.11
pkgrel=1
pkgdesc="FUSE filesystem that introduces non-determinism"
arch=('loong64' 'x86_64')
url="https://reproducible-builds.org/"
license=('GPL3')
depends=('fuse' 'gcc-libs')
makedepends=('asciidoc' 'git')
source=(https://reproducible-builds.org/_lfs/releases/disorderfs/disorderfs_${pkgver}.orig.tar.bz2{,.asc})
sha512sums=('c78a16d9a01d04bc885420f85b3dec3370f11c9948efc95fccb9f1281b95fe680921b729419499e9936f2ed1be82afa531e9f4fe1fa75c49e8171776730ec340'
            'SKIP')
# Holger Levsen, Chris Lamb
validpgpkeys=('B8BF54137B09D35CF026FE9D091AB856069AAA1C' 'C2FE4BD271C139B86C533E461E953E27D4311E58')

build() {
  cd $pkgname-$pkgver
  make
}

# make sure to run with /dev/fuse mounted.
# in extra-*-build this will be with "-- -d /dev/fuse"
check() {
  cd $pkgname-$pkgver
  test -e /dev/fuse && make test || echo "WARNING: Skipping tests due to missing /dev/fuse mount"
}

package() {
  cd $pkgname-$pkgver

  make DESTDIR="$pkgdir/" PREFIX=/usr install
}
